package com.hzqiuxm.tdddemo001.junit5demo.player;

import lombok.Getter;
import lombok.ToString;

/**
 * Copyright © 2021年 tdd-demo-001. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * 玩家信息
 * @date 2021/2/23 12:24
 */
@Getter
@ToString
public class Player {

    private final int id;
    private String name;
    private String showName;

    public Player(int id, String name) {
        this.id = id;
        this.name = name;
        this.showName = name;
    }


    /**
     * 变更显示名
     * @param showName
     */
    public void setShowName(String showName){
        if(showName == null) {
            return;
        }
        this.showName = showName;
    }


}
